<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>华联商场后台管理系统</title>
    <link rel="stylesheet"  type="text/css"  href="/lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/zyUpload.css">
    <link rel="stylesheet" href="/css/style.css">
    <link rel="stylesheet" href="/css/addgood.css">
    <link rel="stylesheet" href="/css/custom.css">
    <link rel="stylesheet" href="/css/iosOverlay.css">
    <link rel="stylesheet" href="/css/prettify.css">
    <link rel="stylesheet" type="text/css" href="/css/layer.css">
    <script src="/lib/plug/modernizr-2.0.6.min.js"></script>
    <link rel="stylesheet" href="/css/upimg.css"/>
</head>
<body >
<div class="panel panel-default">
    <div class="panel-heading " style="font-weight: 600;font-size: 14px"> 添加商品</div>
    <div class="panel-body">
        <form class="form-horizontal" action="{:url('admin/goods/addShop')}" method="post" enctype="multipart/form-data">
            <div id="typewrapper"></div>
            <div class="form-group">
                <label  class="col-sm- control-label" style="font-size: 14px ;font-weight: 600 ;text-align: left;padding-left: 5%">STEP1 选择商品分类：</label>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label"></label>
                <div class="col-sm-10">
                    <div class="row">
                        <div class="col-sm-8">
                            <div class="col-sm-4 form-horizontal">
                                <select class="form-control" id="first">
                                    <option >请选择</option>
                                </select>
                            </div>
                            <div class="col-sm-4 form-horizontal">
                                <select class="form-control" id="section" ></select>
                            </div>
                            <div class="col-sm-4 form-horizontal">
                                <select class="form-control"  id="three" ></select>
                            </div>
                        </div>
                        <input type="text" name="categroy_id" hidden id="threeid">
                        <div class="col-sm-4">
                            <button type="button" class="btn btn-primary" id="bok">确定</button>
                            <a href="{:url('admin/category/insert')}" class="btn btn-link">添加商品分类</a>
                        </div>
                    </div>
                </div>
            </div>
            <hr style="margin-top: 30px">
            <!--通用信息 start-->
            <div class="form-group">
                <label  class="col-sm-6 control-label" style="font-size: 14px ;font-weight: 600 ;text-align: left;padding-left: 5%">STEP2请填写商品通用信息：</label>
            </div>
            <div class="form-group">
                <div class="form-group">
                    <label class="col-sm-2 control-label"> 商品分类：</label>
                    <label class="control-label" id="goodclass" style="padding-left: 10px"  name="shop_type" value=""></label>
                </div>
            </div>
            <div class="form-group">
                <div class="form-group">
                    <label  class="col-sm-2 control-label">商户名称：</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="member_name"  oninvalid="setCustomValidity('请填写商户名称')" oninput="setCustomValidity('')">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="form-group">
                    <label  class="col-sm-2 control-label">商户联系方式：</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="member_phone"  oninvalid="setCustomValidity('请填写商户联系方式')" oninput="setCustomValidity('')">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="form-group">
                    <label  class="col-sm-2 control-label"><i style="color: red">*</i>商品名：</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="shop_name" required oninvalid="setCustomValidity('请您填写商品名')" oninput="setCustomValidity('')">
                    </div>
                    <label style="vertical-align: middle;" id="shopNameCheckTip">商品名字数不能超过40个字</label>

                </div>
            </div>
            <div class="form-group">
                <div class="form-group">
                    <label  class="col-sm-2 control-label" >商品类型：</label>
                    <div class="col-sm-4 checkbox" >
                        <label class="radio-inline" >
                            <input type="radio" name="shop_type" id="inlineRadio2" checked value="0" >普通商品
                        </label>
                        <label class="radio-inline" >
                            <input type="radio" name="shop_type" id="inlineRadio3" disabled value="1">虚拟商品
                        </label>
                    </div>
                </div>
            </div>
            <!--<div class="form-group">-->
                <!--<div class="form-group row">-->
                    <!--<label  class="col-sm-2 control-label"><i style="color: red">*</i>产品简述：</label>-->
                    <!--<div class="col-sm-6">-->
                        <!--<textarea class="form-control " name="shop_sketch" rows="6" required oninvalid="setCustomValidity('请您填写商品描述') "  oninput="setCustomValidity('')"></textarea>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <div class="form-group">
                    <label  class="col-sm-2 control-label">供货商联系方式：</label>
                    <div class="col-sm-4">

                        <input type="text" class="form-control" name="supplier_iphone"  oninvalid="setCustomValidity('请您填写供货商联系方式')" oninput="setCustomValidity('')">

                    </div>
                </div>
                <div class="form-group">
                    <label  class="col-sm-2 control-label">联系人备注：</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control"  name="contact_remark"  oninvalid="setCustomValidity('请您填写联系人备注')" oninput="setCustomValidity('')">
                    </div>
                    <div class="col-lg-tip">
                        <span>【（例如：Alice(当当分店主管)  】</span>
                    </div>
                </div>
                <div class="form-group row">
                    <label  class="col-sm-2 control-label"><i style="color: red">*</i>商品售价(现价)：</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control newPrice"    oninvalid="setCustomValidity('请您填写商品售价')" required oninput="setCustomValidity('')">

                        <input type="text"   name="shop_end_money" hidden >
                    </div>
                    <label style="vertical-align: middle;color: red;display: none" class="tip">数据格式不正确，请填写数字格式</label>
                </div>
                <div class="form-group">
                    <label  class="col-sm-2 control-label">商品显示原价：</label>
                    <div class="col-sm-4">

                        <input type="text"   class="form-control oldPrice" >
                        <input type="text" name="shop_start_money"  hidden >
                    </div>
                    <div class="col-lg-tip">
                        <span>（不填写默认为现价）</span>
                    </div>
                    <label style="vertical-align: middle;color: red;display: none" class="tip">数据格式不正确，请填写数字格式</label>
                </div>
            </div>

            <div class="form-group">
                <label  class="col-sm-12 control-label" style="font-size: 14px ;font-weight: 600 ;text-align: left;padding-left: 5%"><i style="color: red">*</i>商品橱窗展示图：<span style="font-size: 12px
                ;color:#e92300"><i style="color: red">*</i>建议上传尺寸(368px*368px)
                </span></label>
            </div>
            <div class="form-group">
                <div class="form-group">
                    <label  class="col-sm-2 control-label"></label>
                    <div class="col-sm-le">
                        <div class="imgupload-box full">
                            <section class="img-section">
                                <div class="z_photo upimg-div clear">
                                    <section class="z_file fl" style="display: block;">
                                        <img src="/images/bg-tu.png" class="add-img">
                                        <input type="file" name="image_path" id="shiimg"  class="filecc" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">
                                    </section>
                                </div>
                                <p class="up-p up-p-center"><span class="up-span">上传图片</span></p>
                            </section>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="form-group">
                    <label  class="col-sm-2 control-label">商品内部链接：</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control"  name="shop_link" >
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="form-group row">
                    <label  class="col-sm-2 control-label"><i style="color: red">*</i>商品运费：</label>
                    <div class="form-group">
                        <label class="radio-inline">

                            <input type="radio" name="freight"  id="mian" checked value="0" onclick="JM_wu(slshou)"> 免邮

                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="freight"  value="" onclick="JM_you(slshou)">按固定收费:
                        </label>
                        <span id="slshou" class="sl_shou" style="display:none">

                        <input  name="freight" id="yunfei" value="0" type="text" class="form-control" style="display: inline-block;height:25px;width:80px;font-size: 10px " size='5' maxlength='2' placeholder="输入运费">
                        </span>

                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="form-group row">
                    <label  class="col-sm-2 control-label"><i style="color: red">*</i>商品标识：<br>（最多选择3个）</label>
                    <div class="form-group" id="shopCheck">
                        <label class="radio-inline">
                            <input type="checkbox" name="shop_mark[]" checked value="华联自营" onclick="countChoices(this)" >华联自营
                        </label>
                        <label class="radio-inline">
                            <input type="checkbox" name="shop_mark[]"   value="商家认证" onclick="countChoices(this)" >商家认证
                        </label>
                        <label class="radio-inline">
                            <input type="checkbox" name="shop_mark[]"  value="正品保证" onclick="countChoices(this)">正品保证
                        </label>
                        <label class="radio-inline">
                            <input type="checkbox" name="shop_mark[]"  value="7天无理由" onclick="countChoices(this)"> 7天无理由
                        </label>
                        <label class="radio-inline">
                            <input type="checkbox" name="shop_mark[]"  value="快寄免邮" onclick="countChoices(this)"> 快寄免邮
                        </label>
                        <label class="radio-inline">
                            <input type="checkbox" name="shop_mark[]"  value="顺丰速运" onclick="countChoices(this)"> 顺丰速运
                        </label>
                    </div>
                </div>
            </div>
            <hr/>
            <div class="form-group">
                <label  class="col-sm-6 control-label" style="font-size: 14px ;font-weight: 600 ;text-align: left;padding-left: 5%"><i style="color: red">*</i>STEP3 添加商品规格</label>
            </div>
            <div class=" form-group">
                <div class="form-group">
                    <label  class="col-sm-2 control-label"></label>
                    <div class="col-sm-10" id="addType1">
                    </div>
                </div>
            </div>
            <!--通用信息  end-->
            <hr>
            <!--商品详情管理 start-->
            <div class="form-group">
                <label  class="col-sm-6 control-label" style="font-size: 14px ;font-weight: 600 ;text-align: left;padding-left: 5%"><i style="color: red">*</i>STEP4 上传商品详情图</label>
            </div>
            <div class="form-group">
                <label  class="col-sm-12 control-label" style="font-size: 14px ;font-weight: 600 ;text-align: left;padding-left: 5%">上传商品banner图：<span style="font-size: 12px
                ;color:#e92300">建议上传尺寸为(750px*750px)，大小不能超过300kb
                </span></label>
            </div>
            <div class="form-group row">
                <label  class="col-sm-2 control-label"> </label>
                    <div class="col-sm-8">
                        <div class="col-sm-le">
                            <div class="imgupload-box full">
                                <section class="img-section">
                                    <div class="z_photo upimg-div clear">
                                        <section class="z_file fl" style="display: block;">
                                            <img src="/images/bg-tu.png" class="add-img">
                                            <!-- <input type="file" name="banner_path[]" id="file3" class="file3" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">-->
                                            <input type="file" name="banner_path[]" id="banner1" class="file01 bannerimg" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">
                                        </section>
                                    </div>
                                </section>
                            </div>
                        </div>
                        <div class="col-sm-le"><div class="imgupload-box full">
                            <section class="img-section">
                                <div class="z_photo upimg-div clear">
                                    <section class="z_file fl" style="display: block;">
                                        <img src="/images/bg-tu.png" class="add-img">
                                        <!-- <input type="file" name="banner_path[]" id="file3" class="file3" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">-->
                                        <input type="file" name="banner_path[]" id="banner2" class="file01 bannerimg" value=""  accept="image/jpg,image/jpeg,image/png,image/bmp">
                                    </section>
                                </div>
                            </section>
                        </div></div>
                        <div class="col-sm-le"><div class="imgupload-box full">
                            <section class="img-section">
                                <div class="z_photo upimg-div clear">
                                    <section class="z_file fl" style="display: block;">
                                        <img src="/images/bg-tu.png" class="add-img">
                                        <!-- <input type="file" name="banner_path[]" id="file3" class="file3" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">-->
                                        <input type="file"  name="banner_path[]" id="banner3" class="file01 bannerimg" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">
                                    </section>
                                </div>
                            </section>
                        </div></div>
                    </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-12 control-label" style="font-size: 14px ;font-weight: 600 ;text-align: left;padding-left: 5%">上传商品介绍图：<span style="font-size: 12px
                ;color:#e92300">建议上传尺寸为(750px*450px)，大小不能超过300kb
                </span></label>
            </div>
            <div class="form-group row">
       <!--         <label  class="col-sm-2 control-label">
                    <input type="radio" name="details_file"  value="single" class="single">  单张图片上传</label>-->
                <label  class="col-sm-2 control-label">
                  <!-- <button type="button" class="btn btn-default" id="singleBtn">单张图片上传</button><br><br><button type="button" class="btn btn-default" id="moreBtn">多张图片上传</button>--></label>
                <div class="col-sm-8"  id="imgWrapper">
                    <div class="col-sm-le">
                        <div class="imgupload-box full">
                            <section class="img-section">
                                <div class="z_photo upimg-div clear">
                                    <section class="z_file fl" style="display: block;">
                                        <img src="/images/bg-tu.png" class="add-img">
                                        <input type="file" name="detail_path[]" id="shi01" class="file01 filemore" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">
                                    </section>
                                </div>
                                <p class="up-p up-p-center"><span class="up-span">第1张</span></p>
                            </section>
                        </div>
                    </div>
                    <div class="col-sm-le">
                        <div class="imgupload-box full">
                            <section class="img-section">
                                <div class="z_photo upimg-div clear">
                                    <section class="z_file fl" style="display: block;">
                                        <img src="/images/bg-tu.png" class="add-img">
                                        <input type="file" name="detail_path[]" id="shi02" class="file01 filemore" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">
                                    </section>
                                </div>
                                <p class="up-p up-p-center"><span class="up-span">第2张</span></p>
                            </section>
                        </div>
                    </div>
                    <div class="col-sm-le">
                        <div class="imgupload-box full">
                            <section class="img-section">
                                <div class="z_photo upimg-div clear">
                                    <section class="z_file fl" style="display: block;">
                                        <img src="/images/bg-tu.png" class="add-img">
                                        <input type="file" name="detail_path[]" id="shi03" class="file01 filemore" value="" accept="image/jpg,image/jpeg,image/png,image/bmp">
                                    </section>
                                </div>
                                <p class="up-p up-p-center"><span class="up-span">第3张</span></p>
                            </section>
                        </div>
                    </div>
                    <div class="col-sm-le">
                        <div class="imgupload-box full">
                            <button type="button" class="btn btn-default" id="addImg">增加图片</button>
                        </div>
                    </div>
                </div>
            </div>
            <!--商品详情管理 end-->
            <div class="form-group row" style="margin-top: 30px">
                <div class="form-group" style="text-align: center">
                    <button type="submit" class="btn btn-info" id="submit">完成</button>
                    <button type="reset" class="btn btn-success" id="reset">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<!--<!-上传删除确认->-->
<aside class="mask works-mask" style="display: none;">
    <div class="mask-content">
        <p class="del-p ">您确定要删除图片吗？</p>
        <p class="check-p"><span class="del-com wsdel-ok">确定</span><span class="wsdel-no">取消</span></p>
    </div>
</aside>
<script src="/lib/jquery/jquery.min.js"></script>
<script src="/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="/js/iosOverlay.js"></script>
<script src="/lib/plug/spin.min.js"></script>
<script src="/lib/plug/prettify.js"></script>
<script src="/js/method.js"></script>
<script src="/js/addgood.js"></script>
<script src="/js/upload.js"></script>
<script type="text/javascript">
    function JM_wu(ob) {
//        comsole.log(ob);
        ob.style.display = "none";
        $("input[name=freight]").val("0")
    }
    function JM_you(ob) {
        ob.style.display = "";
    }
//    $("#submit").click(function () {
//        console.log($("input[name=freight]").val())
//    })
</script>
</body>
</html>